package com.yiren.dbaa.constant;

import static com.yiren.backstage.currency.constant.DbConstant.USER_DATA_URL;

import android.os.Environment;

import com.yiren.backstage.currency.constant.DbConstant;
import com.yiren.dbaa.net.bean.UrlBean;

import java.io.File;

/**
 * @author lwb
 * @date :2021/12/24 9:54
 * @description: 网络地址常量
 */
public class AddressConstant {

    public static String ALY_SERVER_IP;                     //接口请求地址
    public static String APP_HTML5_URL = "";                //HTML5页面地址
    private static final boolean isCloseBetaTest = true;          //APK更新是否生产版Student
    public static final String DRIVING = "api/v3/driving/"; //滴驾教练请求网址改变 driving

    public static String APK_PATH = "";        //阿里云APK存放路径
    public static String APK_CONFIG_URL = "";  //阿里云APK更新描述路径
    /*** 基础模板数据 bulckName */
    public static final String DJ_BASE_RULE_DATA = "dj-base-rule-data";
    /*** 地图数据 bulckName */
    public static final String DJ_PUBLIC_DATA = "dj-map-data";

    public static String HOST_MACHINE_PATH = "";       //下位机更新存放路径
    public static String HOST_MACHINE_CONFIG_URL = ""; //下位机更新描述路径
    public static final String HOST_MACHINE_NAME = "update.zip"; //下位机更新程序存放的名字

    static {
//        ALY_SERVER_IP = G.isOnline ? "https://api.dj23.cn/" : "http://dev.yirenzn.com:8840/";  // 测试
        ALY_SERVER_IP = G.isOnline ? "http://218.77.108.2:8520/" : "http://dev.yirenzn.com:8840/";  // 测试
        APP_HTML5_URL = G.isOnline ? "https://cs.dj23.cn/dijia30app" : "http://cs.dj23.cn/test/dijia30app";  // 测试
        APK_PATH = isCloseBetaTest ? "dbaa/new/" : "dbaa1/new/";
        APK_CONFIG_URL = isCloseBetaTest ? "dbaa/new/config.txt" : "dbaa1/new/config.txt";
    }

    /**
     * 获取学员头像地址
     */
    public static String getStuPicUrl(String userId) {
        return "http://dj-static.oss-cn-shenzhen.aliyuncs.com/stu/" + userId + "/stuhead/personal_head.png";
    }

    /**
     * 阿里云OSS主目录
     */
    public static String ALIYUN_OSS_MAIN_URL = "https://oss-cn-shenzhen.aliyuncs.com";

    /**
     * APK更新库域名访问地址
     */
    public static String APK_UPDATE_URL = "https://oss-cn-shenzhen.aliyuncs.com";

    /**
     * 程序主目录--正常情况
     */
    public static String App_Main_Directory() {
        String url = DbConstant.App_Main_Directory;
        return url;
    }

    /**
     * 添加附件线路请求地址
     */
    public static UrlBean getAddShareLineUrl() {
        String url = "https://api.dj23.cn/api/v3/driving/driving/share/query_line_round";
        return new UrlBean(url, AddressCodeConstant.ADD_NEARBY_LINE, true);
    }

    /**
     * 学员申请列表
     */
    public static UrlBean getLoadStudentAuthsUrl() {
        String url = "https://api.dj23.cn/" + DRIVING + "driving/student/load_student_auths";
        return new UrlBean(url, AddressCodeConstant.STU_APPLY_LIST, true);
    }

    /**
     * 设置和取消官方线路
     */
    public static UrlBean setOrCancelOfficialLine() {
        String url = ALY_SERVER_IP + "api/v3/driving/driving/line/set_official_line";
        return new UrlBean(url, AddressCodeConstant.SET_CANCEL_OFFICIAL_LINE, true);
    }

    /**
     * 地区城市请求地址
     */
    public static UrlBean getRegionCityUrl(String param) {
        String url = ALY_SERVER_IP + "api/ui/base/region/load_region_info" + param;
        return new UrlBean(url, AddressCodeConstant.GET_REGION_CITY, true);
    }

    /**
     * 根据考场ID获取下载URL请求地址
     */
    public static UrlBean getDownloadExaminationUrl() {
        String url = ALY_SERVER_IP + DRIVING + "driving/site/load_data_info";
        return new UrlBean(url, AddressCodeConstant.BY_SITE_ID_GET_URL, true);
    }

    /**
     * 通过考场siteCode获取考场数据发布信息
     */
    public static UrlBean getLoadReleaseInfoBySiteCode(String param) {
        String url = AddressConstant.ALY_SERVER_IP + DRIVING + "pubreview/load_release_info_by_site_code" + param;
        return new UrlBean(url, AddressCodeConstant.GET_SITE_DATA_RELEASE, true);
    }

    /**
     * 用户信息地址
     */
    public static UrlBean getUserMessageUrl() {
        String url = ALY_SERVER_IP + "api/base/user/info";
        return new UrlBean(url, AddressCodeConstant.GET_USER_INFO_URL, true);
    }

    /**
     * 考场数据目录授权（3.0）: 后台判断是否是合伙人，如果不是合伙人返回失败
     */
    public static UrlBean getDataDirAuthv3(String param) {
//        String url = ALY_SERVER_IP + "api/v3/driving/site_data_api/data_dir_auth" + param;
        String url = "https://api.dj23.cn/api/v3/driving/site_data_api/data_dir_auth" + param;
        return new UrlBean(url, AddressCodeConstant.SITE_DATA_CATALOGUE_AUTH, true);
    }

    /**
     * 数据运维提交考场数据(3.0)
     */
    public static UrlBean getDataSubmitv3() {
        String url = ALY_SERVER_IP + "api/v3/driving/site_data_api/data_submit_return_id";
        return new UrlBean(url, AddressCodeConstant.COMMIT_SITE_DATA, true);
    }

    /**
     * 发布考场数据
     */
    public static UrlBean getReleasePublicDataUrl() {
        String url = ALY_SERVER_IP + "api/v3/driving/pubreview/sava_release";
        return new UrlBean(url, AddressCodeConstant.RELEASE_SITE_DATA, true);
    }

    /**
     * 根据城市名称加載考場信息需要toke请求地址
     */
    public static UrlBean getCityExaminationTokeUrl(String param) {
        String url = ALY_SERVER_IP + "api/base/examinationHallData/loadExaminationHallInfoByRegionName" + param;
        return new UrlBean(url, AddressCodeConstant.BY_CITY_LOAD_SITE_TOKE, true);
    }

    /**
     * 根据城市名称加載考場信息不要toke请求地址
     */
    public static UrlBean getCityExaminationUrl(String param) {
        String url = ALY_SERVER_IP + "api/base/examinationHallData/f/loadExaminationHallInfoByRegionName" + param;
        return new UrlBean(url, AddressCodeConstant.BY_CITY_LOAD_SITE, false);
    }

    /**
     * 下载成功后记录下载数据请求地址
     */
    public static UrlBean getDownloadExaminationFallbackUrl() {
        String url = ALY_SERVER_IP + DRIVING + "driving/site/personExaminationDownloadFallback";
        return new UrlBean(url, AddressCodeConstant.RECORD_LOAD_DATA_URL, true);
    }

    /**
     * 获取设备是否有高精度接口
     */
    public static UrlBean getLoadHighDeviceInfo() {
        String url = ALY_SERVER_IP + "api/base/coach_fee_info_api/load_high_device_info";
        return new UrlBean(url, AddressCodeConstant.GET_DEVICE_HAS_GJD, true);
    }

    /**
     * 系统参数设置表
     */
    public static UrlBean getParamSettingApiUrl() {
        String url = ALY_SERVER_IP + DRIVING + "s_param_setting_api/save_or_update";
        return new UrlBean(url, AddressCodeConstant.GET_SYS_PARAM_FORM, true);
    }

    /**
     * 检查https接口是否能正常访问
     */
    public static UrlBean getCheckSslStatusUrl() {
        String url = ALY_SERVER_IP + "api/base/user/f/check_ssl_status";
        return new UrlBean(url, AddressCodeConstant.CHECK_HTTPS_NORMAL, false);
    }

    /**
     * 获取车辆模型集合-官方
     */
    public static UrlBean getOfficialCarModelList() {
        String url = ALY_SERVER_IP + "api/v3/driving/basestation/car_model_api/get_official_car_model_list";
        return new UrlBean(url, AddressCodeConstant.GET_CAR_MODEL_OFFICIAL, true);
    }

    /**
     * 根据ICCID获取流量卡信息
     */
    public static UrlBean getSimCardInfoByIccid() {
        String url = "https://api.dj23.cn/" + "api/base/p_coach_info_api/load_sim_device_info";
        return new UrlBean(url, AddressCodeConstant.BY_ICCID_GET_CARD, true);
    }

    /**
     * 获取基站编号
     */
    public static UrlBean getBaseNumber() {
        String url = ALY_SERVER_IP + "api/v3/driving/exam_bind_device_cfg_api/load_bind_entity";
        return new UrlBean(url, AddressCodeConstant.GET_BASE_NNUMBER, true);
    }

    /**
     * 获取考场基站数据
     */
    public static UrlBean getExamBaseStation() {
        String url = ALY_SERVER_IP + "api/v3/driving/exam_bind_device_cfg_api/get_list";
        return new UrlBean(url, AddressCodeConstant.GET_SITE_BASE_DATA, true);
    }

    /**
     * 移动站换绑固定基站
     */
    public static UrlBean bindDeviceBase() {
        String url = "http://cs-dj-diff-api.dj23.cn:8083/switch/device";
        return new UrlBean(url, AddressCodeConstant.BIND_BASE_STATION, true);
    }

    /**
     * 获取基站状态
     */
    public static UrlBean getStationStatus(String param) {
        String url = "http://cs-dj-diff-api.dj23.cn:8083/switch/load_device_base_info" + param;
        return new UrlBean(url, AddressCodeConstant.GET_BASE_STATUS, true);
    }

    /**
     * 上传基站经纬高
     */
    public static UrlBean uploadStationLocation() {
        String url = "http://cs-dj-diff-api.dj23.cn:8083/switch/update_lng_and_lat";
        return new UrlBean(url, AddressCodeConstant.UPLOAD_BASE_LOCATION, true);
    }

    /**
     * 获取基站标定状态及经纬高
     */
    public static UrlBean getStationLocation(String param) {
        String url = "http://cs-dj-diff-api.dj23.cn:8083/switch/get_is_update" + param;
        return new UrlBean(url, AddressCodeConstant.GET_BASE_LOCATION, true);
    }

    /**
     * 上传用户终端设备信息接口
     */
    public static UrlBean getUploadUserDeviceInfoUrl() {
        String url = ALY_SERVER_IP + "api/base/s_user_device_info_api/upload_user_device_info";
        return new UrlBean(url, AddressCodeConstant.UPLOAD_TERMINAL_INFO, true);
    }

    /**
     * 通过接口获取4g模块信息
     */
    public static UrlBean get4gInfoByInterface() {
        String url = "https://api.dj23.cn/" + "api/v3/driving/s_param_setting_api/read_non_four_g_info";
        return new UrlBean(url, AddressCodeConstant.GET_4G_MODULE_INFO, true);
    }

    /**
     * 获取快捷练车二维码跳转的链接
     */
    public static UrlBean getQrCodeUrl() {
        String url = "https://api.dj23.cn/" + "api/base/user/get_qrcode_redirect_url";
        return new UrlBean(url, AddressCodeConstant.GET_QRCODE_2_LINK, true);
    }

    /**
     * 用户配置  获取所有的用户数据
     */
    public static UrlBean getUserProfile() {
        String url = "https://api.dj23.cn/" + "api/base/user/user_info";
        return new UrlBean(url, AddressCodeConstant.GET_ALL_USER_DATA, true);
    }

    /**
     * 平板登录成功回调的链接
     */
    public static UrlBean getSuccessCallBackUrl() {
        String url = ALY_SERVER_IP + "api/base/app_scan_login/login_success_call_back";
        return new UrlBean(url, AddressCodeConstant.LOGIN_SUCCESS_CALLBACK, true);
    }

    /**
     * 根据设备芯片码查询绑定的用户信息
     */
    public static UrlBean getEquipmentNoUrl(String param) {
        String url = ALY_SERVER_IP + "api/equipment/equipment_user_api/load_user_by_equipment_no" + param;
        return new UrlBean(url, AddressCodeConstant.QUERY_BIND_USER_INFO, true);
    }

    /**
     * 获取登录二维码的链接
     */
    public static UrlBean getLoginQrCodeUrl() {
        String url = "https://api.dj23.cn/" + "api/base/app_scan_login/f/get_scan_connection";
        return new UrlBean(url, AddressCodeConstant.LOGIN_QRCODE_LINK, true);
    }

    /**
     * 检测登录二维码是否被扫码的链接
     */
    public static UrlBean getLoginStatusUrl(String param) {
        String url = "https://api.dj23.cn/" + "api/base/app_scan_login/f/get_login_status" + param;
        return new UrlBean(url, AddressCodeConstant.CHECK_QRCODE_USE, false);
    }

    /**
     * 用户登录地址
     */
    public static UrlBean getLoginUrl() {
        String url = "https://api.dj23.cn/" + "se/oauth/token";
        return new UrlBean(url, AddressCodeConstant.USER_LOGIN_URL, false);
    }

    /**
     * 免费模式不启动项目评判列表
     */
    public static UrlBean getLoadFNSPointBySiteId() {
        String url = ALY_SERVER_IP + DRIVING + "free_no_start_point_judge_setting_api/load_fns_point_by_siteId";
        return new UrlBean(url, AddressCodeConstant.GET_FNS_PROJECT_LIST, true);
    }

    /**
     * 获取软硬件下载路径
     */
    public static UrlBean getFileDownloadUrl() {
        String url = ALY_SERVER_IP + "api/base/user_update_url_api/get_update_url";
        return new UrlBean(url, AddressCodeConstant.GET_WARE_LOAD_URL, true);
    }

    /**
     * 我的--客服帮助链接请求
     */
    public static UrlBean getOnLineUrl() {
        String url = ALY_SERVER_IP + "api/base/config_api/load_config_by_code?code=SERVICE_COACH";
        return new UrlBean(url, AddressCodeConstant.SERVICE_HELP_LINK, true);
    }

    /**
     * 系统参数设置表
     */
    public static UrlBean getSystemParams(String param) {
        String url = ALY_SERVER_IP + DRIVING + "s_param_setting_api/load_by_user_new" + param;
        return new UrlBean(url, AddressCodeConstant.GET_SYSTEM_PARAMS, true);
    }

    /**
     * 关注公众号新引导页
     */
    public static String getGzGzhNewYdyUrl() {
        return APP_HTML5_URL + "/coach/guide/guide_new_wide.html";
    }

    /**
     * 是否有学员扫描二维码的链接
     */
    public static UrlBean isHaveScanQrCodeUrl(String param) {
        String url = "https://api.dj23.cn/" + "api/base/user/is_have_scan_qrcode_pad" + param;
        return new UrlBean(url, AddressCodeConstant.HAS_STU_SCAN_QRCODE, true);
    }

    /**
     * 获取学员练车开始语音
     */
    public static UrlBean getEntityUrl() {
        String url = ALY_SERVER_IP + "api/base/audio_config_api/f/load_by_entity";
        return new UrlBean(url, AddressCodeConstant.GET_ADVERTISE_VOICE, false);
    }

    /**
     * 加载开始考试播报语音
     */
    public static UrlBean getLoadStartExamPlayVoice() {
        String url = ALY_SERVER_IP + DRIVING + "start_exam_play_voice_api/load_start_exam_play_voice";
        return new UrlBean(url, AddressCodeConstant.START_EXAM_VOICE, true);
    }

    /**
     * 发送开始练车记录
     */
    public static UrlBean getDrivingStartUrl(boolean hasUser) {
        String startUrl;
        if (hasUser) {
            startUrl = ALY_SERVER_IP + DRIVING + "collection/driving_start";
        } else {
            startUrl = ALY_SERVER_IP + "api/driving/collection/driving_start";
        }
        return new UrlBean(startUrl, AddressCodeConstant.START_DRIVING_DATA, true);
    }

    /**
     * 补发练车记录
     */
    public static UrlBean getReissueDrivingUrl() {
        String url = ALY_SERVER_IP + DRIVING + "collection/driving_request_data";
        return new UrlBean(url, AddressCodeConstant.END_DRIVING_DATA, true);
    }

    /**
     * 实时上传车辆轨迹数据
     */
    public static UrlBean uploadRealtimeTraject() {
        String url = ALY_SERVER_IP + "api/v3/driving/driving_record_api/save";
        return new UrlBean(url, AddressCodeConstant.UPLOAD_CAR_POINT_RECORD, true);
    }

    /***
     * 获取sdcard 可用目录,某些安卓系统挂载sdcard时存在sdcard1、sdcard2、sdcard3
     *
     * @return
     */
    public static String fetchAvailableSdcardFolder() {
        String base = Environment.getExternalStorageDirectory().getAbsolutePath();
        String dataPath = USER_DATA_URL;
        File data = new File(base + dataPath);
        if (null != data && !data.exists()) {
            for (int i = 0; i < 5; i++) {
                String findBase = base + i;
                File findData = new File(findBase + dataPath);
                if (findData.exists()) {
                    return findBase;
                }
            }
        }
        return base;
    }

    /*******************************************数据同步上传地址**************************************************/
    /**
     * 线路上传地址查询
     */
    public static UrlBean lineSyscQuery() {
        String url = "api/v3/driving/driving/line/sync_load";
        return new UrlBean(AddressConstant.ALY_SERVER_IP + url, AddressCodeConstant.DATA_SYNC_SERVER, true);
    }

    /**
     * 线路上传地址新增和更新
     */
    public static UrlBean lineSyscAddOrUpdate() {
        String url = "api/v3/driving/driving/line/sync_save_update";
        return new UrlBean(AddressConstant.ALY_SERVER_IP + url, AddressCodeConstant.DATA_SYNC_SERVER, true);
    }

    /**
     * 线路上传地址删除
     */
    public static UrlBean lineSyscDelete() {
        String url = "api/v3/driving/driving/line/sync_delete";
        return new UrlBean(AddressConstant.ALY_SERVER_IP + url, AddressCodeConstant.DATA_SYNC_SERVER, true);
    }

    /**
     * 线路点位上传地址查询
     */
    public static UrlBean linePointSyscQuery() {
        String url = "api/v3/driving/driving/line/point/sync_load";
        return new UrlBean(AddressConstant.ALY_SERVER_IP + url, AddressCodeConstant.DATA_SYNC_SERVER, true);
    }

    /**
     * 线路点位上传地址新增和更新
     */
    public static UrlBean linePointSyscAddOrUpdate() {
        String url = "api/v3/driving/driving/line/point/sync_save_update";
        return new UrlBean(AddressConstant.ALY_SERVER_IP + url, AddressCodeConstant.DATA_SYNC_SERVER, true);
    }

    /**
     * 线路点位上传地址删除
     */
    public static UrlBean linePointSyscDelete() {
        String url = "api/v3/driving/driving/line/point/sync_delete";
        return new UrlBean(AddressConstant.ALY_SERVER_IP + url, AddressCodeConstant.DATA_SYNC_SERVER, true);
    }

    /**
     * 线路点位上传地址删除
     */
    public static UrlBean uploadParamConfig() {
        String url = "api/v3/driving/driving/line/point/sync_delete";
        return new UrlBean(AddressConstant.ALY_SERVER_IP + url, AddressCodeConstant.UPLOAD_PARAM_CONFIG, true);
    }

    /**
     * 获取教练风控参数
     */
    public static UrlBean getCoachRiskResult() {
        String url = ALY_SERVER_IP + "api/base/tb_risk_device_run_result_api/coach_application_risk_result";
        return new UrlBean(url, AddressCodeConstant.GET_COACH_RISK, true);
    }

    /**
     * 发布规则
     *
     * @return
     */
    public static UrlBean publishRule() {
        String url = ALY_SERVER_IP + "api/publish_rule";
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, false);
    }

    /**
     * 加载用户名下已发布考规
     *
     * @return
     */
    public static UrlBean loadRuleByUser(String param) {
        String url = ALY_SERVER_IP + "api/load_exam_rule_by_user_id" + param;
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }

    /**
     * 修改公开考规
     *
     * @param param
     * @return
     */
    public static UrlBean updateSiteRuleState(String param) {
        String url = ALY_SERVER_IP + "api/update_exam_rule_state" + param;
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }

    /**
     * 加载用户某考规版本修改值
     *
     * @param param
     * @return
     */
    public static UrlBean loadExamRuleUpdateDetails(String param) {
        String url = ALY_SERVER_IP + "api/load_exam_rule_modify_val_by_rulever" + param;
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }

    /**
     * 加载城市名下已公开考规
     *
     * @param param
     * @return
     */
    public static UrlBean loadExamRuleByPid(String param) {
        String url = ALY_SERVER_IP + "api/load_exam_rule_by_pid" + param;
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }

    /**
     * 加载某城市下考场名字
     *
     * @param param
     * @return
     */
    public static UrlBean loadExamByPid(String param) {
        String url = ALY_SERVER_IP + "api/load_exam_by_pid" + param;
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }

    /**
     * 加载所有考车公司
     *
     * @return
     */
    public static UrlBean loadAllCompany() {
        String url = ALY_SERVER_IP + "api/load_all_company";
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }

    /**
     * 加载用户某考规发布记录
     *
     * @param param
     * @return
     */
    public static UrlBean loadExamRuleVersions(String param) {
        String url = ALY_SERVER_IP + "api/load_exam_rule_by_site_code" + param;
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }

    /**
     * 修改用户使用范围
     *
     * @param param
     * @return
     */
    public static UrlBean updateUserRange(String param) {
        String url = ALY_SERVER_IP + "api/update_exam_rule_use_range" + param;
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }

    /**
     * 加载省份城市地区
     *
     * @param param
     * @return
     */
    public static UrlBean loadRegionByPid(String param) {
        String url = ALY_SERVER_IP + "api/load_region_by_pid" + param;
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);

    }

    /**
     * 查询最新基础模板数据信息
     *
     * @return
     */
    public static UrlBean loadNewestBase() {
        String url = ALY_SERVER_IP + "api/load_newest_base";
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }

    /**
     * 加载考场用户名下已发布线路
     *
     * @return
     */
    public static UrlBean loadLineByUserSiteCode(String param) {
        String url = ALY_SERVER_IP + "api/load_line_by_user_and_exam" + param;
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }

    /**
     * 修改公开线路状态
     *
     * @param param
     * @return
     */
    public static UrlBean updateLineState(String param) {
        String url = ALY_SERVER_IP + "api/update_line_state" + param;
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }

    /**
     * 加载线路发布记录
     *
     * @param param
     * @return
     */
    public static UrlBean loadLineVersions(String param) {
        String url = ALY_SERVER_IP + "api/load_line_release_record_by_name" + param;
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }

    /**
     * 下载线路数据
     *
     * @param param
     * @return
     */
    public static UrlBean downloadLinedata(String param) {
        String url = ALY_SERVER_IP + "api/load_lineD_data" + param;
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }

    /**
     * 修改用户使用范围(线路)
     *
     * @param param
     * @return
     */
    public static UrlBean updateUserRange_Line(String param) {
        String url = ALY_SERVER_IP + "api/update_line_userange" + param;
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }

    /**
     * 发布线路
     *
     * @return
     */
    public static UrlBean publishLine() {
        String url = ALY_SERVER_IP + "api/publish_line";
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }

    /**
     * 加载共享线路
     *
     * @return
     */
    public static UrlBean loadShareLine(String param) {
        String url = ALY_SERVER_IP + "api/load_line_by_site_code" + param;
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }

    /**
     * 加载某用户下发布的所有的线路
     *
     * @param param
     * @return
     */
    public static UrlBean loadUserAllLine(String param) {
        String url = ALY_SERVER_IP + "api/load_all_line_by_user" + param;
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }

    /**
     * 获取地图绑定的线路
     *
     * @param param
     * @return
     */
    public static UrlBean getMapBindLines(String param) {
        String url = ALY_SERVER_IP + "api/get_map_bind_lines" + param;
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }

    /**
     * 更新地图绑定线路信息
     *
     * @param param
     * @return
     */
    public static UrlBean updateMapBindLine(String param) {
        String url = ALY_SERVER_IP + "api/update_map_bind_line_info" + param;
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }

    /**
     * 加载用户名下已发布地图
     *
     * @return
     */
    public static UrlBean loadMapByUser(String param) {
        String url = ALY_SERVER_IP + "api/load_map_by_user" + param;
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }

    /**
     * 修改公开地图状态
     *
     * @param param
     * @return
     */
    public static UrlBean updateMapState(String param) {
        String url = ALY_SERVER_IP + "api/update_map_state" + param;
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }

    /**
     * 获取基站列表
     *
     * @return
     */
    public static UrlBean getBaseStationList(String param) {
        String url = ALY_SERVER_IP + "api/get_base_station_list_by_distance" + param;
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, false);
    }

    /**
     * 更新基站id
     *
     * @return
     */
    public static UrlBean updateStationId(String param) {
        String url = ALY_SERVER_IP + "api/update_base_station_id" + param;
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }

    /**
     * 更新基站名称
     *
     * @return
     */
    public static UrlBean updateStationName(String param) {
        String url = ALY_SERVER_IP + "api/update_base_station_name" + param;
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }

    /**
     * 新建基站上传信息
     *
     * @return
     */
    public static UrlBean uploadStationInfo() {
        String url = ALY_SERVER_IP + "api/new_base_station_upload_info";
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, false);
    }

    /**
     * 加载城市名下已公开地图
     *
     * @param param
     * @return
     */
    public static UrlBean loadMapByPid(String param) {
        String url = ALY_SERVER_IP + "api/load_map_by_pid" + param;
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }

    /**
     * 加载地图发布记录
     *
     * @param param
     * @return
     */
    public static UrlBean loadMapVersions(String param) {
        String url = ALY_SERVER_IP + "api/load_map_release_record" + param;
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }

    /**
     * 修改用户使用范围(地图)
     *
     * @param param
     * @return
     */
    public static UrlBean updateUserRange_Map(String param) {
        String url = ALY_SERVER_IP + "api/update_map_userange" + param;
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }

    /**
     * 发布地图
     *
     * @return
     */
    public static UrlBean publishMap() {
        String url = ALY_SERVER_IP + "api/publish_map";
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }

    /**
     * 获取采集车模可选的车型
     *
     * @return
     */
    public static UrlBean getAllCarBrand() {
        String url = ALY_SERVER_IP + "api/load_all_car_brand";
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }

    /**
     * 加载用户名下已发布车模
     *
     * @return
     */
    public static UrlBean loadCarModelByUser(String param) {
        String url = ALY_SERVER_IP + "api/load_carmodel_list_by_userId" + param;
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }

    /**
     * 修改公开车模状态
     *
     * @param param
     * @return
     */
    public static UrlBean updateCarModelState(String param) {
        String url = ALY_SERVER_IP + "api/update_car_model_open_status" + param;
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }

    /**
     * 修改用户使用范围(车模)
     *
     * @param param
     * @return
     */
    public static UrlBean updateUserRange_carmodel(String param) {
        String url = ALY_SERVER_IP + "api/update_car_model_use_range" + param;
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }

    /**
     * 加载车模发布记录
     *
     * @param param
     * @return
     */
    public static UrlBean loadCarModelVersions(String param) {
        String url = ALY_SERVER_IP + "api/load_carmodel_release_record_by_id" + param;
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }

    /**
     * 发布车模
     *
     * @return
     */
    public static UrlBean publishCarModel() {
        String url = ALY_SERVER_IP + "api/release_car_model_data";
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }

    /**
     * 下载车模
     *
     * @return
     */
    public static UrlBean downloadCarModel(String param) {
        String url = ALY_SERVER_IP + "api/load_car_model_ver" + param;
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }

    /**
     * 获取工具包下载
     *
     * @return
     */
    public static UrlBean downloadToolKit() {
        String url = ALY_SERVER_IP + "api/load_tool_kit";
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }

    /**
     * 根据考场获取线路
     * @return
     */
    public static UrlBean loadLineinfoBySitecode(String param) {
        String url = ALY_SERVER_IP + "api/load_lineinfo_by_sitecode" + param;
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }

    /**
     * 根据考场获取地图
     * @return
     */
    public static UrlBean loadMapBySitecode(String param) {
        String url = ALY_SERVER_IP + "api/load_map_by_sitecode" + param;
        return new UrlBean(url, AddressCodeConstant.TEST_PORT, true);
    }



}
